package com.gzzz.factory;

import com.gzzz.bean.Input;
import com.gzzz.bean.impl.DatabaseInput;
import com.gzzz.bean.impl.KafkaInput;
import com.gzzz.bean.impl.LocalFileInput;
import com.gzzz.bean.impl.SocketInput;

/**
 * className: InputBeanFactory
 * Package : com.gzzz.factory
 * Description:
 *
 * @Author gzzz
 * @Create 2023/12/6 21:44
 * @Version 1.0
 */
public class InputBeanFactory {
    private static Input inputBean;

    /**
     * 实现inputBean的初始化和赋值
     * @return
     */
    public static Input createLocalFileInput(String filePath) {
        inputBean = new LocalFileInput(filePath);
        return inputBean;
    }

    public static Input createSocketInput() {
        inputBean = new SocketInput();
        return inputBean;
    }

    public static Input createKafkaInput() {
        inputBean = new KafkaInput();
        return inputBean;
    }

    public static Input createDatabaseInput() {
        inputBean = new DatabaseInput();
        return inputBean;
    }
}
